package com.zmn.oms.business.interfaces.es;

import com.zmn.base.oms.common.model.es.orderpart.EsOrderPart;
import org.elasticsearch.search.aggregations.Aggregations;
import org.springframework.data.elasticsearch.core.query.NativeSearchQuery;

import java.util.List;

/**
 * 类描述：
 *
 * @author wangxiaokun
 * @since 2022/05/23 15:39
 */
public interface OrderPartEsBService {

    /**
     * 聚合查询
     * @param nativeSearchQuery
     * @return
     */
    Aggregations getAggregationsByQuery(NativeSearchQuery nativeSearchQuery);

    /**
     * 分页查询
     * @param nativeSearchQuery
     * @return
     */
    List<EsOrderPart> listPageByQuery(NativeSearchQuery nativeSearchQuery);

    /**
     * 查询统计值
     * @param nativeSearchQuery
     * @return
     */
    Long countByQuery(NativeSearchQuery nativeSearchQuery);
}
